<template>
	<view>

		<view class="OuterBox">
			<!--  -->
			<view class="banner_home">
				<u-image :lazy-load="true" :src="banner" width="100%" height="100%">
					<u-loading slot="loading"></u-loading>
				</u-image>
			</view>
			<!--  -->
			<view class="map_box">
				<view class="map_container">
					<maparea ref="ref_map"></maparea>
				</view>
				<view class="map_control">
					<view class="control_outer">
						<view class="location_rise origin FlexAlign">
							顺德区政府-公交站路北
						</view>
						<view class="location_End origin color_End FlexAlign">
							您想去哪儿？
						</view>
					</view>

				</view>
			</view>
			<!--  -->
			<view class="feature_box  ">
				<view class="feature_item FlexColumn"
				v-for="(item, index) in feature_list"
				@click="toPath(item)"
				> 
					<view class="ficon">
						<u-image :lazy-load="true" :src="xtcimg_head + `/index/index2-${index + 1}.png`" mode="widthFix" width="100%" height="100%">
							<u-loading slot="loading"></u-loading>
						</u-image>
					</view>
					<view class="tit">
						{{item.title}}
					</view>
				</view>
			</view>
			<!--  -->
			<view class="envelope_box FlexAlign">
				<view class="envelope_left">
					<view class="tit">
						推荐好友领现金
					</view>
					<view class="txt">
						最高可得现金100元
					</view>
					<view class="en_leftbtn FlexAlign">
						<view class="span FlexItem">
							立即推荐
						</view>
						<view class="icon FlexRow">
							<u-icon name="arrow-right" color="#fff" size="30"></u-icon>
						</view>
					</view>
				</view>
				<view class="envelope_right FlexItem">
					<view class="envelope_item en_rig_top">
						<view class="tit">
							省钱套餐
						</view>
						<view class="contente">
							<view class="txt">
								出行必备福利
							</view>
							<view class="ebtn FlexRow style2">
								限时抢购
							</view>
						</view>
					</view>
					<view class="envelope_item en_rig_bot">
						<view class="tit">
							领券优惠券
						</view>
						<view class="contente">
							<view class="txt">
								最高抵扣10元
							</view>
							<view class="ebtn FlexRow ">
								立即去抢
							</view>
						</view>
					</view>
				</view>
			</view>
			
			<view class="index_ptit">
				关于平台
			</view>
			
			<view class="home_area3 FlexBetween">
				<view class="envelope_item ">
					<view class="tit">
						关于粤顺行
					</view>
					<view class="info FlexBetween">
						<view class="imgicon icon1">
							<u-image :lazy-load="true" :src="platform_icon1"  mode="widthFix" width="100%" height="100%">
								<u-loading slot="loading"></u-loading>
							</u-image>
						</view>
						<view class="contente">
							
							<view class="txt">
								安全出行保障
							</view>
							<view class="ebtn FlexRow style2">
								了解更多
							</view>
						</view>
					</view>
					
				</view>
				<view class="envelope_item ">
					<view class="tit">
						车辆和司机
					</view>
					<view class="info FlexBetween">
						<view class="imgicon icon2">
							<u-image :lazy-load="true" :src="platform_icon2"  mode="widthFix" width="100%" height="100%">
								<u-loading slot="loading"></u-loading>
							</u-image>
						</view>
					
						<view class="contente">
							
							<view class="txt">
								严选车辆司机
							</view>
							<view class="ebtn FlexRow style2">
								立即查看
							</view>
						</view>
					</view>
					
				</view>
			</view>
			
			
			<view class="index_ptit">
				客服信息
			</view>
			
			<view class="home_area3 FlexBetween">
				<view class="envelope_item style2">
					<view class="tit">
						在线客服
					</view>
					<view class="info FlexBetween">
						<view class="imgicon icon3">
							<u-image :lazy-load="true" :src="service_icon1"  mode="widthFix" width="100%" height="100%">
								<u-loading slot="loading"></u-loading>
							</u-image>
						</view>
						<view class="contente">
							
							<view class="txt">
								为你提供服务
								
							</view>
							<view class="ebtn FlexRow style3">
								联系客服
							</view>
						</view>
					</view>
					
				</view>
				<view class="envelope_item style2">
					<view class="tit">
						常见问题
					</view>
					<view class="info FlexBetween">
						<view class="imgicon icon4">
							<u-image :lazy-load="true" :src="service_icon2"  mode="widthFix" width="100%" height="100%">
								<u-loading slot="loading"></u-loading>
							</u-image>
						</view>
						<view class="contente">
							
							<view class="txt">
								常见问题解答
							</view>
							<view class="ebtn FlexRow style3">
								立即查看
							</view>
						</view>
					</view>
					
				</view>
			</view>
		</view>
		<tabbox></tabbox>
	</view>
</template>

<script>
	import {External_featurelist} from "./js/feature.js"
	export default {
		data() {
			return {
				xtcimg_head: 'https://scrm.51kuaiding.com/scrm/hktxcx/img_xtc',
				
				banner: 'https://img.js.design/assets/img/66386c4446a9c2110118681e.jpg#3a0b961a605f02224f885182dd8d1197',
				mapBg: 'https://img.js.design/assets/img/6638309663df91572c1d78f7.png#6d481767d721661fcc26ec4240297dee',
				feature_list: External_featurelist,
				platform_icon1: 'https://img.js.design/assets/img/663878a688b3d70fffa9cab8.png#4618cefa3eadc91c0541385c1a014b91',
				platform_icon2: 'https://img.js.design/assets/img/66384894de20b33f95e11a00.png#6188c7db52d01b8544194449b5dea8a8',
				service_icon1: 'https://img.js.design/assets/img/66384ac06a34c8766ff1b5c7.png#1d6370a7a5ff53b4d088224f6d4fa2b9',
				service_icon2: 'https://img.js.design/assets/img/66384b7387e45cdceabee470.png#1d653c3b5cd1256ca1f9c4875ebe8d96',
			}
		},
		onLoad() {
			this.initialization()
		},
		methods: {
			initialization(){
				setTimeout(()=>{
					if(this.$refs.ref_map) {
						this.$refs.ref_map.arshow = true
					}
				}, 1500)
			},
			toPath(item) {
				if(!item.path) return
				uni.navigateTo({
					url: item.path,
				})
			},
		},
	}
</script>
<style lang="scss" scoped>
	.OuterBox {
		width: 100% !important;
		padding: 20rpx;
		background: #fff;
	}
	.banner_home {
		width: 100%;
		height: 200rpx;
		border-radius: 16rpx;
		overflow: hidden;
		margin-bottom: 20rpx;
	}
	.map_box {
		width: 100%;
		position: relative;
		padding-top: 400rpx;
		margin-bottom: 43rpx;
		.map_container {
			width: 100%;
			height: 448rpx;
			border-radius: 16rpx;
			overflow: hidden;
			position: absolute;
			z-index: 1;
			top: 0;
			left: 0;
		}
		.origin {
			&::before {
				content: '';
				display: inline-block;
				width: 14rpx;
				height: 14rpx;
				margin-right: 14rpx;
				border-radius: 100%;
				background: rgba(10, 175, 115, 1);
			}
			&.color_End::before {
				background: #F5AD03;
			}
		}
		.map_control {
			position: relative;
			z-index: 3;
			padding: 0 22rpx;
			width: 100%;
			.control_outer {
				width: 100%;
				min-height: 212rpx;
				border-radius: 18rpx;
				background: #FFFFFF;
				box-shadow: 0px 12rpx 16rpx #E4E7EE;
				padding: 0 30rpx 28rpx 30rpx;
			}
			.location_rise {
				font-size: 26rpx;
				font-weight: 700;
				color: rgba(10, 175, 115, 1);
				min-height: 98rpx;
				padding: 38rpx 0 28rpx 0;
				padding: 0 20rpx;
			}
			.location_End {
				font-size: 34rpx;
				font-weight: 700;
				color: rgba(12, 14, 13, 1);
				width: 100%;
				height: 86rpx;
				border-radius: 12rpx;
				background: #F6F8FB;
				padding: 0 20rpx;
			}
		}
	}
	.feature_box {
		width: 100%;
		display:flex;
		flex-wrap: wrap;
		justify-content: space-between;
		.feature_item {
			margin-bottom: 31rpx;
			width: 20%;
			.ficon {
				width: 72rpx;
				height: 72rpx;
				border-radius: 18rpx;
				overflow: hidden;
				image {
					width: 100%;
					height: 100%;
				}
			}
			.tit {
				margin-top: 9rpx;
				font-size: 22rpx;
				font-weight: 400;
				color: rgba(38, 38, 38, 1);
				text-align: center;
			}
		}
	}
	.envelope_box{
		height: 416rpx;
		.envelope_left{
			padding: 32rpx;
			border-radius: 18rpx;
			overflow: hidden;
			width: 348rpx;
			height: 100%;
			border-radius: 18rpx;
			background: #EDF6FF;
			border: 2rpx solid #E9F2FF;
			background: url("https://scrm.51kuaiding.com/scrm/hktxcx/img_xtc/index/index3-1.jpg") no-repeat;
			background-size: cover;
			background-position: center;
			.tit{
				font-size: 34rpx;
				font-weight: 700;
				color: rgba(38, 38, 38, 1);
			}
			.txt{
				font-size: 20rpx;
				font-weight: 400;
				color: rgba(35, 35, 35, 1);
			}
			.en_leftbtn{
				margin-top: 220rpx;
				width: 198rpx;
				height: 62rpx;
				border-radius: 200rpx;
				background: linear-gradient(90deg, #589FFC 0%, #015CD6 100%);
				box-shadow: 6rpx 10rpx 12rpx  rgba(57,117,225,.2);
				.span{
					font-size: 25rpx;
					font-weight: 700;
					color: rgba(255, 255, 255, 1);
					text-align: center;
					margin-top: -3rpx;
				}
				padding: 8rpx;
				.icon{
					margin-left: 6rpx;
					width: 48rpx;
					height: 48rpx;
					border-radius: 100%;
					background: #F4AC00;
				}
			}
		}
		.envelope_right{
			height: 100%;
			padding-left: 14rpx;
			.envelope_item{
				padding: 28rpx;
				.contente{
					margin-top: 28rpx;
					padding-left: 137rpx;
				}
			}
			.en_rig_top{
				margin-bottom: 14rpx;
				background: url("https://scrm.51kuaiding.com/scrm/hktxcx/img_xtc/index/index3-2.jpg") no-repeat;
				background-size: cover;
				background-position: center;
			}
			.en_rig_bot{
				background: url("https://scrm.51kuaiding.com/scrm/hktxcx/img_xtc/index/index3-3.jpg") no-repeat;
				background-size: cover;
				background-position: center;
			}
		}
	}
	.envelope_item{
		border-radius: 18rpx;
		overflow: hidden;
		padding: 28rpx;
		height: 200rpx;
		width: 334rpx;
		.tit{
			font-size: 28rpx;
			font-weight: 400;
			color: rgba(38, 38, 38, 1);
		}
		.info{
			margin-top: 25rpx;
			width: 100%;
			.contente .ebtn{
				margin-top: 10rpx;
			}
		}
		.contente{
			.txt{
				font-size: 22rpx;
				font-weight: 400;
				color: rgba(38, 38, 38, 1);
			}
			.ebtn{
				margin-top: 12rpx;
				width: 140rpx;
				height: 44rpx;
				border-radius: 200rpx;
				background: #FFFFFF;
				border: 2rpx solid #DBEDFF;
				font-size: 22rpx;
				font-weight: 400;
				color: rgba(30, 71, 143, 1);
				text-align: center;
				&.style2{
					color: #fff;
					border: none;
					background: linear-gradient(90deg, #589FFC 0%, #015CD6 100%);
					box-shadow: 6rpx 10rpx 12rpx  rgba(57,117,225,.2);
				}
				&.style3{
					color: #fff;
					border: none;
					background: linear-gradient(90deg, #FF952B 0%, #F4AC00 100%);
					box-shadow: 6rpx 10rpx 6rpx  rgba(255,141,26, .2);
				}
			}
		}
	}
	.index_ptit{
		margin: 44rpx 0 22rpx 0;
		font-size: 34rpx;
		font-weight: 700;
		color: rgba(0, 0, 0, 1);
	}
	.home_area3{
		width: 100%;
		.envelope_item{
			background: linear-gradient(180deg, #F0F7FF, #FFFFFF);
			border: 2rpx solid #E9F2FF;
			&.style2{
				background: linear-gradient(180deg, #FFF2EC, #FFFFFF );
				border: 2rpx solid #FFEBE6;
			}
			.icon1{
				width: 108rpx;
			}
			.icon2{
				width: 150rpx;
			}
			.icon3{
				width: 92rpx;
			}
			.icon4{
				width: 82rpx;
			}
		}
	}
</style>